<?php defined("SYSPATH") or die("No direct script access.") ?>
	
	<pre><?php // print_r($items); ?></pre>
	
<? /*foreach ($items as $item): ?>
	
	<?php // echo $item->name ?>
	
<div class="g-image-block">
  <a href="<?= $item->url() ?>">
   <?= $item->title ?>
  </a>
</div>
<? endforeach*/ ?>
<?php
$parentId = 1;
?>
<?php 
foreach (db::build()
             ->select("*")
             ->from("items")
             ->where("parent_id", "=", $parentId)
             ->execute() as $row) 
			 
			{
				$albums['title'][] = $row->title;
				$albums['url'][] = $row->relative_url_cache;
				$albums['id'][] = $row->id;
			}
			
// 			print_r($albums['title']);
	?>
   <ul>
<?php
	$i = 0;
   foreach ($albums as $key => $value[]) {
	   ?>
	   

	<li id="<?php echo $albums['id'][$i]; ?>">
		<a href="<?php echo url::site() .  $albums['url'][$i]; ?>">
			<?php echo $albums['title'][$i]; ?>
		</a>
	</li>

	   
	   <?php
		
		$i++;
}
	?>	
	</ul>
	<?php
foreach($albums as $albums => $album){
// 	echo $albums;
// 	print_r($album);
// 	echo $album[0]
}


?>